x86/spec-ctrl: Yet more fixes for xpti= parsing
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 9 Aug 2018 16:22:17 +0000 (17:22 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 14 Aug 2018 15:59:23 +0000 (16:59 +0100)
commit6fe9726aebc11433083b9810402501f1a71d02fd
tree1742c67c3f46c615e941c837d295664df855a145
parent33ced725e11af4eabd3334d12f53ed807e9e2586
x86/spec-ctrl: Yet more fixes for xpti= parsing

As it currently stands, 'xpti=dom0' is indistinguishable from the default
value, which means it will be overridden by ARCH_CAPABILITIES_RDCL_NO on fixed
hardware.

Switch opt_xpti to use -1 as a default like all our other related options, and
clobber it as soon as we have a string to parse.

In addition, 'xpti' alone should be interpreted in its positive boolean form,
rather than resulting in a parse error.

  (XEN) parameter "xpti" has invalid value "", rc=-22!

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
(cherry picked from commit 2a3b34ec47817048ab59586855cf0709fc77487e)
xen/arch/x86/spec_ctrl.c
xen/include/asm-x86/spec_ctrl.h